<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ page import="java.util.*"%>
<%@page import="org.omg.CORBA.Request"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<script language="javascript" type="text/javascript"
			src="<%=request.getContextPath()%>/Pages/Js/jquery-1.3.2.js"></script>
		<script language="javascript" type="text/javascript"
			src="<%=request.getContextPath()%>/Pages/Controls/ui.datepicker.js"></script>
		<script language="javascript" type="text/javascript"
			src="<%=request.getContextPath()%>/Pages/Js/olexam.js"></script>
		<script language="javascript" type="text/javascript"
			src="<%=request.getContextPath()%>/Pages/Js/role.js"></script>
		<script language="javascript" type="text/javascript"
			src="<%=request.getContextPath()%>/Pages/Js/json2.js"></script>
		<script language="javascript" type="text/javascript"
			src="<%=request.getContextPath()%>/Pages/Js/forum.js"></script>
		<link href="<%=request.getContextPath()%>/Pages/Css/header.css"
			rel="stylesheet" type="text/css" />
		<link href="<%=request.getContextPath()%>/Pages/Css/main.css"
			rel="stylesheet" type="text/css" />

		<%!@SuppressWarnings("unchecked")
	public Set<String> turnObjToSet(Object obj) {
		return (Set<String>) obj;
	}%>
		<%
			Set<String> urls = null;
			if (session.getAttribute("username") != null) {
				urls = turnObjToSet(session.getAttribute(session
						.getAttribute("username")
						+ "_urls"));
			}
			response.setHeader("Cache-Control", "no-cache");
			response.setHeader("Cache-Control", "no-store");
			response.setDateHeader("Expires", 0);
			response.setHeader("Pragma", "no-cache");
		%>

	</head>
	<body>
		<div id="header_part">
			<div id="header">
				<div id="userPanel">
					<div id="userInfor">
						<logic:present name="username" scope="session">Hi ${username}</logic:present>
					</div>
					<div id="tools">
						<span>Settings&nbsp;&nbsp;|&nbsp;</span><span>Help&nbsp;&nbsp;|&nbsp;</span><span><a
							href="<%=request.getContextPath()%>/logout.do">Logout</a> </span>
					</div>
				</div>
			</div>
			<div id="nav">
				<ul id="ul">
					<%
						if (urls != null && urls.contains("/user")) {
					%>
					<li id="li1">
						<a id="a1"
							href="<%=request.getContextPath()%>/Pages/Jsp/User/userMenu.jsp">
							<span id="span1">User</span> </a>
					</li>
					<%
						}
					%>
					<%
						if (urls != null && urls.contains("/roleMgt")) {
					%>
					<li id="li2">
						<a id="a2" href="<%=request.getContextPath()%>/roleMgt.do"> <span
							id="span2"> Role </span> </a>
					</li>
					<%
						}
					%>
					<%
						if (urls != null && urls.contains("/forum")) {
					%>
					<li id="li3">
						<a id="a3"
							href="<%=request.getContextPath()%>/forum/visitForum.do?action=listForum">
							<span id="span3"> Forum </span> </a>
					</li>
					<%
						}
					%>
				</ul>
			</div>
		</div>
	</body>
</html>